// Ofri Keidar 302933981 group 05

package model;

/**
 * Class represents a product in store system
 */
public class Product {

	// product's details
	private String name;
	private double price;
	
	/**
	 * Constructor- creates a new product with given name and price
	 * @param name- new product's name
	 * @param price- new product's price
	 */
	public Product(String name, double price) {
		
		// set members according to given values
		this.name = name;
		this.price = price;
	}

	/**
	 * Returns product's name
	 * @return product's name attribute
	 */
	public String getName() { return name; }
	
	/**
	 * Returns product's price
	 * @return product's price attribute
	 */
	public double getPrice() { return price; }
	
	/**
	 * Sets product's price to given value
	 * @param newPrice- product's new price
	 */
	public void setPrice(double newPrice) { price = newPrice; }
}